<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "dh_mailbox".
 *
 * @property integer $id
 * @property string $name
 * @property string $phone
 * @property string $email
 * @property string $code
 * @property integer $type
 * @property string $account
 * @property string $theme
 * @property string $content
 * @property string $annex
 * @property integer $static
 * @property integer $reply_id
 * @property string $info_code
 * @property string $ip
 * @property integer $refer_time
 */
class DhMailbox extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'dh_mailbox';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            
            [['id', 'type', 'static', 'reply_id'], 'integer'],
            [['content'], 'string'],
            [['refer_time','update_time'], 'safe'],
            [['name', 'email'], 'string', 'max' => 50],
            [['phone'], 'string', 'max' => 11],
            [['code', 'info_code'], 'string', 'max' => 10],
            [['account', 'ip'], 'string', 'max' => 22],
            [['theme'], 'string', 'max' => 255],
            [['annex'], 'string', 'max' => 200]
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '名字',
            'phone' => 'Phone',
            'email' => 'Email',
            'code' => '邮编',
            'type' => '1.身份证号 2.',
            'account' => '证件号',
            'theme' => '主题  标题',
            'content' => '内容',
            'annex' => '附件',
            'static' => '是否回复 0 未回复  1已回复',
            'reply_id' => '回复ID',
            'info_code' => '回复码',
            'ip' => 'id地址',
            'refer_time' => '提交时间',
        ];
    }
}
